import moment from "moment";

const Mock = require("mockjs");
const Random = Mock.Random;
// import testImgUrl from "../../assets/img/test01.jpg";
/*
* 需求：requirementApi
* */
Mock.mock("/backend/behavior/req/list", "post", (options) => {
    let body = JSON.parse(options.body);
    let {status} = body.req;
    let requirement_list_1 = [
        {
            "id": 1,
            "requirementId": 1001,
            "requirementName": "欢go_8.6_Android",
            "requirementType": 1,
            "bizName": "欢go基础",
            "version": 8.6,
            "sdkType": 1,
            "appId": 100,
            "appName": "欢go",
            "testAddress": "http://sensor.bestpay.com.cn/s.gif?project=test",
            "officialAddress": "http://sensor.bestpay.com.cn/s.gif?project=bestpay",
            "status": 0,
            "extMessage": "欢go客户端8.6版本埋点需求定义",
            "creatorName": "张三",
            "createTime": moment().format("YYYY-MM-DD HH:mm:ss"),
            "updateTime": moment().format("YYYY-MM-DD HH:mm:ss"),
        },
        {
            "id": 2,
            "requirementId": 1002,
            "requirementName": "山西企业微信5G升级包",
            "requirementType": 2,
            "bizName": "加装5G升级包",
            "version": null,
            "sdkType": 4,
            "appId": 101,
            "appName": "存量栏目H5",
            "testAddress": "http://testurl",
            "officialAddress": "http://officialurl",
            "status": 2,
            "creatorName": "张三",
            "createTime": moment().format("YYYY-MM-DD HH:mm:ss"),
            "updateTime": moment().format("YYYY-MM-DD HH:mm:ss"),
        },
    ];
    let requirement_list_2 = [
        {
            "id": 1,
            "requirementId": 1001,
            "requirementName": "欢go_8.6_Android",
            "requirementType": 1,
            "bizName": "欢go基础",
            "version": 8.6,
            "sdkType": 1,
            "appId": 100,
            "appName": "欢go",
            "testAddress": "http://sensor.bestpay.com.cn/s.gif?project=test",
            "officialAddress": "http://sensor.bestpay.com.cn/s.gif?project=bestpay",
            "status": 2,
            "extMessage": "欢go客户端8.6版本埋点需求定义",
            "creatorName": "张三",
            "createTime": moment().format("YYYY-MM-DD HH:mm:ss"),
            "updateTime": moment().format("YYYY-MM-DD HH:mm:ss"),
        },
        {
            "id": 2,
            "requirementId": 1002,
            "requirementName": "山西企业微信5G升级包",
            "requirementType": 2,
            "bizName": "加装5G升级包",
            "version": null,
            "sdkType": 4,
            "appId": 101,
            "appName": "存量栏目H5",
            "testAddress": "http://testurl",
            "officialAddress": "http://officialurl",
            "status": 2,
            "creatorName": "张三",
            "createTime": moment().format("YYYY-MM-DD HH:mm:ss"),
            "updateTime": moment().format("YYYY-MM-DD HH:mm:ss"),
        },
    ];
    if (status === 2) {
        return {
            success: true,
            value: {
                "list": requirement_list_2,
                "total": 100
            }
        }
    } else {
        return {
            success: true,
            value: {
                "list": requirement_list_1,
                "total": 100
            }
        }
    }

});
Mock.mock("/backend/behavior/req/sync-list", {
    success: true,
    value: {
        "list": [
            {
                "id": 1,
                "requirementId": 1,
                "requirementName": "转账_1.0_JS_第一版上线",
                "requirementType": 1,
                "bizName": "@name",
                "version": 1.1,
                "sdkType|1-3": 1,
                "appId": Random.integer(),
                "appName": "@name",
                "testAddress": Random.url(),
                "officialAddress": Random.url(),
                "status": Random.integer(1, 50),
                "creatorName": "@name",
                "createTime": Random.now(),
                "updateTime": Random.now(),
            },
            {
                "id": 2,
                "requirementId": 2,
                "requirementName": "转账_2.0_JS_第二版上线",
                "requirementType": 1,
                "bizName": "@name",
                "version": 1.1,
                "sdkType|1-3": 1,
                "appId": Random.integer(),
                "appName": "@name",
                "testAddress": Random.url(),
                "officialAddress": Random.url(),
                "status": Random.integer(1, 50),
                "creatorName": "@name",
                "createTime": Random.now(),
                "updateTime": Random.now(),
            }
        ],
        "total": 100
    }
});
Mock.mock("/backend/behavior/req/query", "post", (options) => {
    let body = JSON.parse(options.body);
    let {id} = body.req;
    let obj = {};
    let requirement_query = {
        "id": 1,
        "requirementId": 1001,
        "requirementName": "欢go_8.6_Android",
        "requirementType": 1,
        "appId": 101,
        "bizId": 200,
        "bizName": "欢go基础",
        "version": 8.6,
        "sdkType": 1,
        "appName": "欢go",
        "status": 0,
        "productCode": "wz",
        "extMessage": "欢go客户端8.6版本埋点需求定义",
        "creatorName": "张三",
        "createTime": moment().format("YYYY-MM-DD HH:mm:ss"),
        "updateTime": moment().format("YYYY-MM-DD HH:mm:ss"),
    };
    let requirement_query_web = {
        "id": 2,
        "requirementId": 1002,
        "requirementName": "山西企业微信5G升级包",
        "requirementType": 2,
        "bizName": "加装5G升级包",
        "version": null,
        "sdkType": 2,
        "appId": 101,
        "appName": "存量栏目H5",
        "testAddress": "http://testurl",
        "officialAddress": "http://officialurl",
        "status": 2,
        "creatorName": "张三",
        "createTime": moment().format("YYYY-MM-DD HH:mm:ss"),
        "updateTime": moment().format("YYYY-MM-DD HH:mm:ss"),
    };
    if (Number(id) === 1) {
        obj = requirement_query;
    } else {
        obj = requirement_query_web;
    }
    return {
        success: true,
        value: obj
    }
})
/*
* 位置：pageApi
* */
// 列表
Mock.mock("/backend/behavior/page/list", "post", (options) => {
    let body = JSON.parse(options.body);
    let {requirementId, level} = body.req;
    if (requirementId) {
        requirementId = Number(requirementId);
    }
    let list1 = [
        {
            "id": 1,
            "pageId": "a100.b200",
            "pageName": "查询办理",
            "pageType": 1,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111619178856219943.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": 0,
            "level": 1,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0",
            "hasChildren": true,
        },
        {
            "id": 2,
            "pageId": "a100.b300",
            "pageName": "我的频道",
            "pageType": 1,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111618728376184220.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 30,
            "eventCollectedNum": 10000,
            "parentId": 0,
            "level": 1,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0",
            "hasChildren": true,
        },
    ];
    let list2 = [
        {
            "id": 4,
            "pageId": "a100.b200.c300",
            "pageName": "查询办理_频道导航",
            "pageType": 2,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111619179083041888.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": "a100.b200",
            "level": 2,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0"
        },
    ];
    let list3 = [
        {
            "id": 12,
            "pageId": "a100.b200.c300.d400",
            "pageName": "查询办理_频道导航_流量",
            "pageType": 2,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111619178891860715.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": "a100.b200",
            "level": 2,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0"
        },
        {
            "id": 5,
            "pageId": "a100.b200.c300.d100",
            "pageName": "查询办理_频道导航_常用",
            "pageType": 3,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111618728376184220.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": "a100.b200.c300",
            "level": 3,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0"
        },

    ];
    let page_list_web = [
        {
            "id": 10,
            "pageId": "a100.b200",
            "pageName": "山西5天暖心包活动",
            "pageType": 1,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111619178794401276.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": "a100.b200.c300",
            "level": 3,
            "bizId": 201,
            "bizDbId": 2,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0"
        }
    ];
    let list = [];
    if (level === 2) {
        list = list2;
    } else if (level === 3) {
        list = list3;
    } else if (!level || level === 1) {
        if (requirementId === 1001) {
            list = list1;
        }
        if (requirementId === 1002) {
            list = page_list_web;
        }
        if (!requirementId) {
            list = list1.concat(page_list_web);
        }
    }
    return {
        success: true,
        value: {
            "list": list,
            "total": 100
        }
    }
});
Mock.mock("/backend/behavior/page/query", "post", (options) => {
    let body = JSON.parse(options.body);
    let {id} = body.req;
    id = Number(id);
    let obj = {};
    let list = [
        {
            "id": 1,
            "pageId": "a100.b200",
            "pageName": "查询办理",
            "pageType": 1,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111619178856219943.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": 0,
            "level": 1,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0",
            "hasChildren": true,
        },
        {
            "id": 2,
            "pageId": "a100.b300",
            "pageName": "我的频道",
            "pageType": 1,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111618728376184220.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 30,
            "eventCollectedNum": 10000,
            "parentId": 0,
            "level": 1,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0",
            "hasChildren": true,
        },
        {
            "id": 4,
            "pageId": "a100.b200.c300",
            "pageName": "查询办理_频道导航",
            "pageType": 2,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111619179083041888.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": "a100.b200",
            "level": 2,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0"
        },
        {
            "id": 12,
            "pageId": "a100.b200.c300.d400",
            "pageName": "查询办理_频道导航_流量",
            "pageType": 2,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111619178891860715.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": "a100.b200",
            "level": 2,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0"
        },
        {
            "id": 5,
            "pageId": "a100.b200.c300.d100",
            "pageName": "查询办理_频道导航_常用",
            "pageType": 3,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111618728376184220.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": "a100.b200.c300",
            "level": 3,
            "bizId": 201,
            "bizDbId": 1,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0"
        },
        {
            "id": 10,
            "pageId": "a100.b200",
            "pageName": "山西5天暖心包活动",
            "pageType": 1,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111619178794401276.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": "a100.b200.c300",
            "level": 3,
            "bizId": 201,
            "bizDbId": 2,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0"
        }
    ];
    list.forEach(item => {
        if (item.id === id) {
            obj = item;
        }
    });
    return {
        success: true,
        value: obj,
    }
});
Mock.mock("/backend/behavior/page/navigate", "post", (options) => {
    let body = JSON.parse(options.body);
    let {requirementId} = body.req;
    console.log(body.req)
    let list = [];
    let page_navigate_list = [
        {
            id: 1,
            pageId: "a100.b200",
            pageName: '查询办理',
            imageUrl: "https://www.189.cn/dqimage/111618728376184220.jpg",
            pageType: 1,
            parentId: 0,
        },
        {
            id: 2,
            pageId: "a100.b300",
            pageName: '我的频道',
            pageType: 1,
            imageUrl: "https://www.189.cn/dqimage/111618728376184220.jpg",
            parentId: 0,
        },
        {
            id: 4,
            pageId: "a100.b200.c300",
            pageName: '频道导航',
            pageType: 2,
            parentId: 1,
        },
        {
            id: 12,
            pageId: "a100.b200.c300.d400",
            pageName: '流量',
            pageType: 2,
            parentId: 4
        },
        {
            id: 5,
            pageId: "a100.b200.c300.d100",
            pageName: '常用',
            pageType: 3,
            parentId: 4,
        },
    ];
    let page_navigate_list_web = [
        {
            "id": 10,
            "pageId": "a100.b200",
            "pageName": "山西5天暖心包活动",
            "pageType": 1,
            "subType": 1,
            "subTypeValue": "综合页",
            "pageUrl": "http://testpageurl",
            "imageUrl": "https://www.189.cn/dqimage/111618728376184220.jpg",
            "requirementType": 1,
            "version": "portal_20200111",
            "eventNum": 10,
            "eventCollectedNum": 20003,
            "parentId": "a100.b200.c300",
            "level": 3,
            "bizId": 201,
            "bizDbId": 2,
            "bizName": "欢go基础",
            "subEventNum": "20/1/0"
        }
    ];
    if (Number(requirementId) === 1001) {
        list = page_navigate_list;
    } else {
        list = page_navigate_list_web;
    }
    return {
        success: true,
        value: {
            "pageNavigateList": list,
            "total": 100
        }
    }
});
/*
* 埋点：eventApi
* */
// 列表
Mock.mock("/backend/behavior/track/list", "post", (options) => {
    let event_list = [
        {
            id: 1,
            trackId: "a100.b200_500_pageview",
            trackName: "查询办理_页面浏览",
            eventId: "pageview",
            eventName: "页面浏览",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 310000,
            userCount: 3000,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 3,
            trackId: "a100.b200_c300_500_flowclick",
            trackName: "查询办理_频道导航_流量点击",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 30000,
            userCount: 4877,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "频道导航",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 4,
            trackId: "a100.b200.c300_502_flow_ban1",
            trackName: "查询办理_频道导航_流量_图片位1",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 2,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "流量",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 10,
            trackId: "a100.b200.c300.d400_504_exposure",
            trackName: "压后台启动",
            eventId: "performancemonitor",
            eventName: "性能监控事件",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    "propertyType": "pagestay",
                    "propertyId": 1,
                    "propertyName": "页面停留",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "停留时间(单位：秒)"
                },
                {
                    "propertyType": "pageno",
                    "propertyId": 2,
                    "propertyName": "页面序号",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "页面序号（页面的展示序号）"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 11,
            trackId: "a100.b200.c300.d400_504_exposure",
            trackName: "性能监控",
            eventId: "performancemonitor",
            eventName: "性能监控事件",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    "propertyType": "pagestay",
                    "propertyId": 1,
                    "propertyName": "页面停留",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "停留时间(单位：秒)"
                },
                {
                    "propertyType": "pageno",
                    "propertyId": 2,
                    "propertyName": "页面序号",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "页面序号（页面的展示序号）"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
    ]
    let event_list_page = [
        {
            id: 1,
            trackId: "a100.b200_500_pageview",
            trackName: "查询办理_页面浏览",
            eventId: "pageview",
            eventName: "页面浏览",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 310000,
            userCount: 3000,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
    ];
    let event_list_page_all = [
        {
            id: 1,
            trackId: "a100.b200_500_pageview",
            trackName: "查询办理_页面浏览",
            eventId: "pageview",
            eventName: "页面浏览",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 310000,
            userCount: 3000,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "certification_status",
                    propertyName: "实名状态",
                    propertyType: 1,
                    dataType: 1,
                    verifyRule: "枚举范围",
                    remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "certification_status1",
                    propertyName: "实名状态",
                    propertyType: 2,
                    dataType: 2,
                    verifyRule: "枚举范围",
                    remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 3,
            trackId: "a100.b200_c300_500_flowclick",
            trackName: "查询办理_频道导航_流量点击",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 30000,
            userCount: 4877,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "频道导航",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 4,
            trackId: "a100.b200.c300_502_flow_ban1",
            trackName: "查询办理_频道导航_流量_图片位1",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 2,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "流量",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
    ];
    let event_list_block = [
        {
            id: 3,
            trackId: "a100.b200_c300_500_flowclick",
            trackName: "查询办理_频道导航_流量点击",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 30000,
            userCount: 4877,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "频道导航",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
    ];
    let event_list_block_all = [
        {
            id: 3,
            trackId: "a100.b200_c300_500_flowclick",
            trackName: "查询办理_频道导航_流量点击",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 30000,
            userCount: 4877,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "频道导航",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 4,
            trackId: "a100.b200.c300_502_flow_ban1",
            trackName: "查询办理_频道导航_流量_图片位1",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 2,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "流量",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
    ];
    let event_list_booth = [];
    let event_list_booth_all = [];
    let event_list_block_block = [
        // 查询办理_频道导航_流量_图片位1
        {
            id: 4,
            trackId: "a100.b200.c300_502_flow_ban1",
            trackName: "查询办理_频道导航_流量_图片位1",
            eventType: "click",
            eventTypeName: "点击",
            version: "portal_20191120",
            requirementType: 2,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "流量",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
    ]

    let no_event_list = [
        {
            id: 10,
            trackId: "a100.b200.c300.d400_504_exposure",
            trackName: "压后台启动",
            eventId: "performancemonitor",
            eventName: "性能监控事件",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    "propertyType": "pagestay",
                    "propertyId": 1,
                    "propertyName": "页面停留",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "停留时间(单位：秒)"
                },
                {
                    "propertyType": "pageno",
                    "propertyId": 2,
                    "propertyName": "页面序号",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "页面序号（页面的展示序号）"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 11,
            trackId: "a100.b200.c300.d400_504_exposure",
            trackName: "性能监控",
            eventId: "performancemonitor",
            eventName: "性能监控事件",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    "propertyType": "pagestay",
                    "propertyId": 1,
                    "propertyName": "页面停留",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "停留时间(单位：秒)"
                },
                {
                    "propertyType": "pageno",
                    "propertyId": 2,
                    "propertyName": "页面序号",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "页面序号（页面的展示序号）"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
    ];
    let event_list_page_web = [
        {
            id: 20,
            trackId: "a100.b200_501_order",
            trackName: "山西5天暖心包活动_立即订购",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 40000,
            userCount: 2000,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "山西5天暖心包活动",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
    ];
    let list = [];
    let body = JSON.parse(options.body);
    let {hasPosition, requirementId, hasChildren, pageId} = body.req;
    console.log(body.req);
    if (Number(requirementId) === 1001) {
        if (!pageId) {
            if (hasPosition === true) {
                list = no_event_list;
            } else if (hasPosition === null) {
                list = event_list;
            } else {
                list = event_list_page_all;
            }
        }
        if (pageId === "a100.b200") {
            if (hasChildren) {
                list = event_list_page_all;
            } else {
                list = event_list_page;
            }
        }
        if (pageId === "a100.b200.c300") {
            if (hasChildren) {
                list = event_list_block_all;
            } else {
                list = event_list_block;
            }
        }
        if (pageId === "a100.b200.c300.d100") {
            if (hasChildren) {
                list = event_list_booth_all;
            } else {
                list = event_list_booth;
            }
        }
        if (pageId === "a100.b200.c300.d400") {
            list = event_list_block_block;
        }
    } else {
        list = event_list_page_web;
    }

    return {
        success: true,
        value: {
            list,
            total: 100
        }
    }
});

Mock.mock("/backend/behavior/track/query", "post", (options) => {
    let body = JSON.parse(options.body);
    let {id} = body.req;
    let event_list = [
        {
            id: 1,
            trackId: "a100.b200_500_pageview",
            trackName: "查询办理_页面浏览",
            eventId: "pageview",
            eventName: "页面浏览",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 310000,
            userCount: 3000,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 3,
            trackId: "a100.b200_c300_500_flowclick",
            trackName: "查询办理_频道导航_流量点击",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 30000,
            userCount: 4877,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "频道导航",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 4,
            trackId: "a100.b200.c300_502_flow_ban1",
            trackName: "查询办理_频道导航_流量_图片位1",
            eventType: "click",
            eventTypeName: "点击",
            version: "portal_20191120",
            requirementType: 3,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "流量",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 20,
            trackId: "a100.b200_501_order",
            trackName: "山西5天暖心包活动_立即订购",
            eventId: "click",
            eventName: "点击",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 40000,
            userCount: 2000,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "点击时"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    // propertyType: 1,
                    // dataType: 1,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    // propertyType: 2,
                    // dataType: 2,
                    // verifyRule: "枚举范围",
                    // remark: "检测用户的实名状态"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "山西5天暖心包活动",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 10,
            trackId: "a100.b200.c300.d400_504_exposure",
            trackName: "压后台启动",
            eventId: "performancemonitor",
            eventName: "性能监控事件",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    "propertyType": "pagestay",
                    "propertyId": 1,
                    "propertyName": "页面停留",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "停留时间(单位：秒)"
                },
                {
                    "propertyType": "pageno",
                    "propertyId": 2,
                    "propertyName": "页面序号",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "页面序号（页面的展示序号）"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
        {
            id: 11,
            trackId: "a100.b200.c300.d400_504_exposure",
            trackName: "性能监控",
            eventId: "performancemonitor",
            eventName: "性能监控事件",
            version: "portal_20191120",
            requirementType: 1,
            dataStatus: 1,
            hitCount: 35600,
            userCount: 3766,
            bizId: 200,
            bizName: "欢go基础",
            // 事件属性
            "actionEffectName": "跳转",
            "actionTypeName": "",
            "extMessage": {
                "actionEffect": 1,
                "actionType": 1,
                "trackOpportunity": "在页面加载完成后触发"
            },
            "processStatus": 0,
            "demoCode": "//在用户浏览商品页面时……\n" +
                "try{\n" +
                "JSONObject properties = new JSONObject();\n" +
                "// 需求ID，必须设置\n" +
                "properties.put('requirementId', '1');\n" +
                "// 埋点标识，必须设置\n" +
                "properties.put('trackSign', 'abestpay_portal.b1.c2.c3_appclick');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 栏目码\n" +
                "properties.put('businessShortName', 'portal');\n" +
                "// 页面类型\n" +
                "properties.put('pageType', '综合页');\n" +
                "// 区块类型\n" +
                "properties.put('blockType', '金刚位');\n" +
                "// 展位类型\n" +
                "properties.put('elementType', '子应用');\n" +
                "// 已选属性\n" +
                "// 动作类型\n" +
                "// 动作效果\n" +
                "}",
            "fieldAttributes": [
                {
                    "propertyType": "pagestay",
                    "propertyId": 1,
                    "propertyName": "页面停留",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "停留时间(单位：秒)"
                },
                {
                    "propertyType": "pageno",
                    "propertyId": 2,
                    "propertyName": "页面序号",
                    "dataType": "string",
                    "explain": "test",
                    "remark": "页面序号（页面的展示序号）"
                }
            ],
            "pageDO": {
                pageId: "a100.b200",
                pageName: "查询办理",
                pageType: 1,
                subType: "综合页",
                pageUrl: "",
            }
        },
    ]
    let obj = {};
    event_list.forEach(item => {
        if (item.id === Number(id)) {
            obj = item;
        }
    })
    return {
        success: true,
        value: obj,
    }
})
Mock.mock("/backend/behavior/track/status/operate", "post", () => {
    return {
        success: true
    }
})

/*
* 应用：app
* */
Mock.mock("/backend/behavior/app/list", "post", () => {
    let app_list = [
        {
            "id": 1,
            "appId": 100,
            "appName": "欢go",
            "appType": 1,
            "appTypeName": "客户端",
            "bizId": 200,
            "bizName": "欢go基础",
            "mngDept": "集团-欢go运营部",
            "eventNum": 10,
            "eventCollectedNum": 20003,
        },
        {
            "id": 2,
            "appId": 101,
            "appName": "存量栏目H5",
            "appType": 2,
            "appTypeName": "H5",
            "bizId": 201,
            "bizName": "欢go基础",
            "mngDept": "集团-大数据运营部",
            "eventNum": 10,
            "eventCollectedNum": 20003,
        },
    ];
    return {
        success: true,
        value: {
            list: app_list,
            total: 100
        }
    }
});

/*
* 栏目：biz
* */
Mock.mock("/backend/behavior/biz/list", "post", (options) => {
    let body = JSON.parse(options.body);
    let {appId} = body.req;
    let biz_list = [
        {
            "id": 1,
            "bizId": 200,
            "bizName": "欢go基础",
            "appId": 100,
            "appName": "欢go",
            "orgCode": 0,
            "orgCodeValue": "集团",
            "bizSubTypeCode": 1,
            "bizSubTypeValue": "欢go基础",
            "eventNum": 15,
            "eventCollectedNum": 33443
        },
        {
            "id": 2,
            "bizId": 201,
            "bizName": "加装5G升级包",
            "appId": 101,
            "appName": "存量栏目H5",
            "orgCode": 1,
            "orgCodeValue": "山西",
            "bizSubTypeCode": 2,
            "bizSubTypeValue": "4升5",
            "eventNum": 15,
            "eventCollectedNum": 33443
        }
    ];
    let list = [];
    if (!appId) {
        list = biz_list;
    } else {
        biz_list.forEach(item => {
            if (item.appId === appId) {
                list.push(item);
            }
        })
    }
    return {
        success: true,
        value: {
            list: list,
            total: 100
        }
    }
});

Mock.mock("/backend/behavior/biz/query", "post", (options) => {
    let body = JSON.parse(options.body);
    let {id} = body.req;
    let biz_list = [
        {
            "id": 1,
            "bizId": 200,
            "bizName": "欢go基础",
            "appId": 100,
            "appName": "欢go",
            "orgCode": 0,
            "orgCodeValue": "集团",
            "bizSubTypeCode": 1,
            "bizSubTypeValue": "欢go基础",
            "eventNum": 15,
            "eventCollectedNum": 33443
        },
        {
            "id": 2,
            "bizId": 201,
            "bizName": "加装5G升级包",
            "appId": 101,
            "appName": "存量栏目H5",
            "orgCode": 1,
            "orgCodeValue": "山西",
            "bizSubTypeCode": 2,
            "bizSubTypeValue": "4升5",
            "eventNum": 15,
            "eventCollectedNum": 33443
        }
    ];
    let obj = {};
    biz_list.forEach(item => {
        if (item.id === Number(id)) {
            obj = item;
        }
    })
    console.log(obj);
    return {
        success: true,
        value: obj,
    }
});

/*
* 元数据：机构
* */
Mock.mock("/backend/behavior/metadata/query", "post", (options) => {
    let body = JSON.parse(options.body);
    let {type} = body.req;
    let res;
    if (type === "organization_code") {
        res = {
            success: true,
            value: {
                data: {
                    1: "集团-合作部",
                    2: "广东分公司",
                    3: "四川分公司",
                    4: "湖北分公司"
                }
            }
        };
    } else if (type === "business_type") {
        res = {
            success: true,
            value: {
                data: {
                    1: "欢go基础",
                    2: "4升5"
                }
            }
        };
    }
    return res;
});

/*
* 事件类型：eventType
* */
Mock.mock("/backend/behavior/meta-event/list", "post", (options) => {
    let body = JSON.parse(options.body);
    let {hasPosition} = body.req;
    console.log(body.req);
    let event_type_list_1 = [
        {
            id: 1,
            eventId: "pageview",
            eventName: "页面浏览",
            actionType: 1,
            actionEffect: 1,
        },
        {
            id: 2,
            eventId: "pagestay",
            eventName: "页面停留",
            actionType: 1,
            actionEffect: 1,
        },
        {
            id: 3,
            eventId: "blockview",
            eventName: "区块浏览",
            actionType: 1,
            actionEffect: 1,
        },
        {
            id: 4,
            eventId: "exposure",
            eventName: "曝光",
            actionType: 1,
            actionEffect: 1,
        },
        {
            id: 5,
            eventId: "click",
            eventName: "点击",
            actionType: 1,
            actionEffect: 1,
        },
    ];
    let event_type_list_2 = [
        {
            id: 10,
            eventId: "performancemonitor",
            eventName: "性能监控事件",
            actionType: 1,
            actionEffect: 1,
        },
    ]
    let list = [];
    if (hasPosition !== null) {
        list = event_type_list_1;
    } else {
        list = event_type_list_2;
    }
    return {
        success: true,
        value: {
            list
        },
    }
});

Mock.mock("/backend/behavior/meta-event/prefabricated", "post", (options) => {
    let body = JSON.parse(options.body);
    let {type} = body.req;
    let action_type_list = [
        {
            code: 1,
            value: "切换tab"
        },
    ];
    let action_effect_list = [
        {
            code: 1,
            value: "左滑"
        }
    ];
    let list = [];
    if (type === "actionType") {
        list = action_type_list;
    } else {
        list = action_effect_list;
    }
    return {
        success: true,
        value: {
            list
        }
    }
})
/*
* 事件属性：eventProperty
* */
Mock.mock("/backend/behavior/meta-property/list", "post", () => {
    return {
        success: true,
        value: {
            list: [
                {
                    id:1,
                    category: 1,
                    propertyId: "element_name",
                    propertyName: "元素名称",
                    propertyType: 1,
                    dataType: 1,
                    verifyRule: "枚举范围",
                    remark: "检测用户的实名状态"
                },
                {
                    id:2,
                    category: 1,
                    propertyId: "element_position",
                    propertyName: "元素位置",
                    propertyType: 2,
                    dataType: 2,
                    verifyRule: "数值范围",
                    remark: "规定流程里，间隔时长（单位：秒)"
                },
                {
                    id:3,
                    category: 1,
                    propertyId: "click_num",
                    propertyName: "点击序数",
                    propertyType: 3,
                    dataType: 2,
                    verifyRule: "数值范围",
                    remark: "规定流程里，当前点击所处的序数"
                }
            ],
            total: 100
        }
    }
});

Mock.mock("/backend/behavior/meta-property/property", "post", (options) => {
    let body = JSON.parse(options.body);
    let {type} = body.req;
    let list = [];
    let categoryList = [
        { code: 1, value: "通用" },
        { code: 2, value: "内容" },
        { code: 3, value: "页面" },
        { code: 4, value: "区块" },
        { code: 5, value: "控件" },
        { code: 6, value: "产品" },
    ];
    let propertyTypeList = [
        { code: 1, value: "全局" },
        { code: 2, value: "页面浏览" },
        { code: 3, value: "点击" },
    ];
    let dataTypeList = [
        { code: 1, value: "字符串" },
        { code: 2, value: "数值" },
    ];
    if (type === "category") {
        list = categoryList;
    } else if (type === "propertyType") {
        list = propertyTypeList;
    } else if (type === "dataType") {
        list = dataTypeList;
    }
    return {
        success: true,
        value: {
            list
        }
    }
});


/*
* 统计：eventReport
* */
Mock.mock("/backend/compute/track/report", "post", (options) => {
    let body = JSON.parse(options.body);
    let {type} = body.req;
    console.log(type);
    let date = ["2021-04-10", "2021-04-11", "2021-04-12"];
    let typeValues = [];
    if (type === "page") {
        typeValues = ["页面浏览量", "页面用户量", "平均浏览时长"];
    } else {
        typeValues = ["事件浏览量", "事件用户量", "户均点击量"];
    }

    let arr = [];
    let dateRows = [];
    for (let j = 0; j < date.length; j++) {
        for (let i = 0; i < 24; i++) {
            dateRows.push(date[j] + " " + (i<10 ? "0" + i : i));
        }
    }
    for (let j = 0; j < typeValues.length; j++) {
        let list = [];
        for (let i = 0; i < dateRows.length; i++) {
            list.push(parseInt(Math.random() * 100));
        }
        arr.push(list);
    }

    return {
        success: true,
        value: {
            dataRows: dateRows,
            typeValues,
            values: arr
        }
    }
    // let byFields = ["2021-04-10", "2021-04-11", "2021-04-12"];
    // let dataRows = [];
    // if (type === 1) {
    //     dataRows = [
    //         {
    //             byValues: ["00", "01", "02", "03", "04"],
    //             values: [23, 232, 53, 64, 15]
    //         },
    //         {
    //             byValues: ["00", "01", "02", "03", "04"],
    //             values: [61, 22, 13, 14, 35]
    //         },
    //         {
    //             byValues: ["00", "01", "02", "03", "04"],
    //             values: [15, 21, 36, 47, 59]
    //         },
    //     ]
    // } else if (type === 2) {
    //     dataRows = [
    //         {
    //             byValues: ["00", "01", "02", "03", "04"],
    //             values: [53, 23, 16, 73, 12]
    //         },
    //         {
    //             byValues: ["00", "01", "02", "03", "04"],
    //             values: [42, 12, 453, 24, 12]
    //         },
    //         {
    //             byValues: ["00", "01", "02", "03", "04"],
    //             values: [12, 63, 12, 23, 64]
    //         },
    //     ]
    // } else if (type === 3) {
    //     dataRows = [
    //         {
    //             byValues: ["00", "01", "02", "03", "04"],
    //             values: [53, 23, 16, 73, 12]
    //         },
    //         {
    //             byValues: ["00", "01", "02", "03", "04"],
    //             values: [42, 12, 453, 24, 12]
    //         },
    //         {
    //             byValues: ["00", "01", "02", "03", "04"],
    //             values: [12, 63, 12, 23, 64]
    //         },
    //     ]
    // }
})
